home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 23 / Amiga Format AFCD23 (Feb 1998, Issue 107).iso / -seriously_amiga- / shareware / graphics / sviewng / arexx-scripts / convertanyfile.rx next >
Text File  |  1997-12-01  |  1KB  |  70 lines

  1. /*
  2.    $VER: ConvertAnyFile.rx V7.16 (21.7.97)
  3.    © 1993-97 by Andreas R. Kleinert
  4.  
  5.    This script demonstrates loading, saving (converting) and
  6.    displaying files by using SViewNG's ARexxPort.
  7.  
  8.    USAGE: RX ConvertAnyFile InFile OutFile
  9.  
  10. */
  11.  
  12. parse arg sourcefile destfile
  13.  
  14. sourcefile = strip(sourcefile)
  15. destfile = strip(destfile)
  16.  
  17. address command
  18.  
  19. SViewNG "-INSTALL_APPMENU=FALSE -INSTALL_APPICON=FALSE"
  20.  
  21. say ""
  22. say "ARexx: SViewNG has been started : Waiting a moment..."
  23.  
  24. wait 5
  25.  
  26. OPTIONS RESULTS
  27. SIGNAL ON ERROR
  28. SVNGPORT = 'SViewNG.rx'
  29. SVPORT   = 'SuperView.rx'
  30.  
  31. IF ~SHOW('P',SVPORT) THEN SVPORT = SVNGPORT
  32. IF ~SHOW('P',SVPORT) THEN DO
  33.   say "Could not locate ARexx port of SViewNG !"
  34.   CALL ErrorOut 0
  35. END
  36.  
  37. ADDRESS VALUE SVPORT
  38.  
  39. say "ARexx: Loading a PCX Graphics via the LOAD command"
  40. 'LOAD='||sourcefile
  41.  
  42. say "ARexx: Saving Graphics as IFF ILBM"
  43.  
  44. 'SAVE_TYPE=ILBM CmpByteRun1'
  45. 'SAVE='||destfile
  46.  
  47. address command wait 3
  48.  
  49. say "ARexx: Load this ILBM Gfx now for control"
  50.  
  51. 'SHOW='||destfile
  52.  
  53. say "ARexx: O.K. : Let's quit !"
  54.  
  55. address command Wait 2
  56.  
  57. 'QUIT'
  58.  
  59. CALL ErrorOut 0
  60.  
  61.  
  62. /* Errorout procedure ----------------------- */
  63.  
  64. ErrorOut:
  65.         PARSE ARG ExitCode
  66.  
  67.         EXIT ExitCode
  68.  
  69.   END
  70.